package com.haier.npt.security.service;

import java.util.List;

import com.baomidou.mybatisplus.service.IService;
import com.haier.npt.security.domain.SysPermission;


/**
 * @Description:权限项服务 
 * @author: lixu
 * @date:   2018年7月13日 下午2:29:02   
 */
public interface SysPermissionService extends IService<SysPermission> {
	
    /**
     * @Description: 添加一个权限项
     * @param: @param sysPermission
     * @param: @return      
     * @return: boolean      
     * @throws   
     */
    boolean addPermission(SysPermission sysPermission);


    
    /**
     * @Description: 根据权限项编号查询权限项
     * @param: @param permissionIdList
     * @param: @return      
     * @return: List<SysPermission>      
     * @throws   
     */
    List<SysPermission> listPermission(List<Long> permissionIdList);



    /**
     * @Description: 根据权限项编号删除权限项
     * @param: @param id
     * @param: @return      
     * @return: boolean      
     * @throws   
     */
    boolean deletePermissionById(Long id);

    
    /**
     * @Description: TODO 根据parentCode获取全部子权限项,包括父权限项本身
     * @param: @param parentCode
     * @param: @return      
     * @return: List<SysPermission>      
     * @throws   
     */
    List<SysPermission> listPermissionByParentCode(String parentCode);


    /**
     * @Description: 通过code批量获取
     * @param: @param permissionCodes
     * @param: @return      
     * @return: List<SysPermission>      
     * @throws   
     */
    List<SysPermission> listPermissionByCodes(List<String> permissionCodes);


    /**
     * @Description: 获取子级权限项
     * @param: @param pId
     * @param: @return      
     * @return: List<SysPermission>      
     * @throws   
     */
    List<SysPermission> listPermissionByPId(Long pId);

    /**
     * @Description: 加载所有的权限项目
     * @param: @return      
     * @return: List<SysPermission>      
     * @throws   
     */
    List<SysPermission> listAllPermission();

}
